<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>增加会员</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../../../../elementUI/index.css">
  <link rel="stylesheet" href="../../../../css/index.css">
</head>

<body>
  <div id="app" class="minWidth">
    <el-form :model="form" :rules="rules" ref="contract" inline-message="true" style="width: 100%">
      <div class="table_titel">
        <div class="titel">优惠卷主体信息</div>
      </div>
      <el-descriptions :column="3" border size="small">
        <el-descriptions-item label="选择公司">
          <el-form-item prop="Enterprise_Info_SerialNumber_A">
            <el-select v-model.trim="form.Enterprise_Info_SerialNumber_A" placeholder="公司名称" filterable
              style="width: 100%">
              <el-option v-for="(item,index) in enterprise" :key="index" :label="item.Enterprise_Name"
                :value="item.Enterprise_Info_SerialNumber"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="总额">
          <el-form-item prop="Total_Amount">
            <el-input type="number" v-model.trim="form.Total_Amount" placeholder="请输入"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="总数量">
          <el-form-item prop="Coupon_Total_Quantity">
            <el-input v-model.trim="form.Coupon_Total_Quantity" disabled placeholder="请输入"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="支付方式">
          <el-form-item prop="Mobile">
            <el-select v-model.trim="form.Mobile" placeholder="支付方式" filterable style="width: 100%">
              <el-option label="预付款" value="0"></el-option>
              <el-option label="后付款" value="1"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="消耗">
          <el-form-item>
            <el-input disabled v-model.trim="form.Consumption_Amount"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="剩余">
          <el-form-item>
            <el-input disabled v-model.trim="form.Remain_Amount"></el-input>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>

      <div style="margin-bottom: 100px;">
        <div class="table_titel">
          <div class="titel">优惠卷信息</div>
          <div>
            <el-button type="primary" size="small" @click="add_member_account_info">新增</el-button>
            <el-button type="danger" size="small" @click="remove_member_account_info">删除</el-button>
          </div>
        </div>
        <el-descriptions :column="4" border size="small" v-for="(item,index) in form.Children.coupon_info" :key="index">
          <el-descriptions-item label="面额">
            <el-form-item prop="Coupon_Price">
              <el-input type="number" v-model.trim="item.Coupon_Price" :disabled="flag" @input="hanldeChange(index)"
                placeholder="请输入"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="数量">
            <el-form-item prop="Coupon_Quantity">
              <el-input type="number" v-model.trim="item.Coupon_Quantity" :disabled="flag" @input="hanldeChange(index)"
                placeholder="请输入"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="使用规则">
            <el-form-item prop="Coupon_Type_SerialNumber">
              <el-select v-model.trim="item.Coupon_Type_SerialNumber" filterable style="width: 100%">
                <el-option label="满减" value="0"></el-option>
                <el-option label="折扣" value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="合计">
            <el-form-item>
              <el-input :disabled="true" v-model.trim="item.Coupon_Total_Price">{{item.Coupon_Total_Price}}</el-input>
            </el-form-item>
          </el-descriptions-item>
      </div>
      <!-- <el-descriptions-item label="账户类型">
          <el-form-item prop="Account_Type">
            <el-select v-model.trim="form.Children.member_account_info.Account_Type" placeholder="账户类型" filterable
              style="width: 100%">
              <el-option label="储值卡账户" value="0"></el-option>
              <el-option label="积分账户" value="1"></el-option>
              <el-option label="礼券账户" value="1"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item> -->
      </el-descriptions>
      <el-form-item class="form-operation">
        <el-button @click="window.history.back()">返回</el-button>
        <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
  <script type="text/javascript" src="../../../../js/jquery-3.6.0.min.js"></script>
  <script type="text/javascript" src="../../../../js/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../../js/vue.min.js"></script>
  <script type="text/javascript" src="../../../../elementUI/index.js"></script>
  <script type="text/javascript" src="../../../../js/utils.js"></script>
  <script type="text/javascript" src="../../../../js/ID_Validity.js"></script>
  <script type="text/javascript" src="./js/Add.js"></script>
</body>

</html>